<?php

//防止恶意调用
if (!defined('IN_MOD'))
{
    die('Hacking attempt');
}

// 栏目数据列表
if($configinfo['columndataok'] == 1)
{
	$modulewhere=array();
	$modulewhere['limit'] = "all";
	$modulewhere['langallok'] = 1;
	$indexmodulecolumn = configcolumn($modulewhere);
	// 获取语言关联栏目信息
	if($configinfo['columnattrok'] == 1 && $configinfo['langok'] == 1)
	{
		foreach($indexmodulecolumn as $key=>$val)
		{
			$indexmodulecolumn[$key] = modulelangcolumn($val,$val[$configinfo['cat_id']]);
		}
	}
	foreach($indexmodulecolumn as $key=>$val)
	{	
		// 栏目列表
		$configindex['columnlist'][$val[$configinfo['cat_id']]] = $val;	
		
		// 子栏目列表
		if($val[$configinfo['parent_id']])
		{
			$configindex['subcolumn'][$val[$configinfo['parent_id']]][] = $val;	
		}
		
		// 标识模块栏目
		if($configinfo['columnok'])
		{
			$configindex['indexcolumn'][$val['index_num']] = $val;	
		}
		
		// 导航菜单
		if($configinfo['navok'])
		{
			if($val['nav'] == 1 || $val['nav'] == 3)
			{
				$configindex['navcolumn']['head'][] = $val;	
			}
			if($val['nav'] == 2 || $val['nav'] == 3)
			{
				$configindex['navcolumn']['foot'][] = $val;	
			}
		}
	}
}

// 多语言网站URL配置
if($configinfo['langok'] == 1)
{
	foreach($configinfo['langall'] as $key=>$val)
	{
		if($configinfo["langdefault"]==$key)
		{
			$configindex['indexurl'][$key] = $configinfo['weburl']."/";
		}else{
			$langhomeurl = $configinfo['langhomeurl'];
			$langhomeurl = str_replace("{lang}",$key,$langhomeurl);
			$configindex['indexurl'][$key] = $configinfo['weburl'].$langhomeurl;	
		}
	}
}
?>